<%@page contentType="text/html; charset=utf-8"%>
<%@ include file="../inc/TagLibs.jsp"%>
<c:set var="pageTitle" value="银行账号" />
<%@ include file="../inc/Title.jsp"%>
<head>
<link rel="stylesheet" type="text/css" href="/css/base.css" />
<script src="/js/popup_ext.js"></script>
<script language="javascript">
	function doNew(){
		var url="/base/BankAccountNew.ihtm";
		ShowIframeNoScroll("银行账号",url,400,370,"refreshWin()");
	}
	function refreshWin(){
		window.location.reload(true);
	}
	function doEdit(id){
		var url="/base/BankAccountEdit.ihtm?id="+id;
		ShowIframeNoScroll("银行账号",url,400,370,"refreshWin()");
	}
	function doDelete(id){
		ShowConfirm('确认框','确定删除吗？',340,80,"doDelAct("+id+")");
	}
	function doDelAct(id){
		if(popRetVal!=null){
			var fromUrl=getFromUrl();
			window.location="/base/BankAccountDelete.ihtm?id="+id+"&from_url="+fromUrl;
		}
	}
	function doPause(id,flag){
		var fromUrl=getFromUrl();
		window.location="/base/BankAccountPause.ihtm?id="+id+"&flag="+flag+"&from_url="+fromUrl;
	}
	function getFromUrl(){
		var fromUrl="/base/BankAccountList.ihtm";
		return encodeURIComponent(fromUrl);
	}
	function doCancel(){
		window.close();
	}
</script>
</head>
<body oncontextmenu="return false"  class="sheet" style="text-align:center;">
<div class="sheet-main" style="width:860px;text-align:left;margin:auto;">
  <div class="sheet-top">
    <div class="content">
      <h2>银行账户</h2>
      <p>设置资金收付的账户，只有现金账户才会出现业务单、外协单、采购单上</p>
    </div>
  </div>
  <div class="sheet-list">
    <div class="search-business">
      <div class="add_content">
          <div align="right">
			<input type="button" class="buttom search-add" value=" 新 增" onClick="doNew();" ${disabledStr}>  												         
			</div>
      </div>
	     <%@include file="../inc/AlertMsg.jsp"%>      
     	<div class="table-list">
        <table width="100%">
          <tr>
						<th width="6%" >序号</th>
						<th width="16%" >开户名</th>
						<th width="20%" >开户银行</th>
						<th width="12%" >所属帐套</th>
						<th width="10%" >现金账户</th>
						<th width="16%" >账户余额</th>
						<th width="6%" >状态</th>
						<th width="14%" >操作</th>
					</tr>
					<c:forEach var="item" items="${bankAccountList}">
					<tr <c:if test="${item.bankAccount.status=='N'}">style="color:red"</c:if>>
						<td>${item.bankAccount.sequenceCode}</td>
						<td>${item.bankAccount.accountName}</td>
						<td>${item.bankAccount.bankName}</td>
						<td>${item.tallySetName}</td>
						<td>
							<c:if test="${item.bankAccount.isTmp=='Y'}">是</c:if>
							<c:if test="${item.bankAccount.isTmp=='N'}">否</c:if>
						</td>
						<td>${item.bankAccount.currentCost}</td>
						<td>
							<c:if test="${item.bankAccount.status=='Y'}">正常</c:if>
							<c:if test="${item.bankAccount.status=='N'}">停用</c:if>
						</td>
						<td>
							<a href="javascript:doEdit('${item.bankAccount.id}');">编辑</a>
							<c:if test="${item.bankAccount.status=='Y'}"><a href="javascript:doPause('${item.bankAccount.id}','N');">停用</a></c:if>
							<c:if test="${item.bankAccount.status=='N'}"><a href="javascript:doPause('${item.bankAccount.id}','Y');">启用</a></c:if>
							<a href="javascript:doDelete('${item.bankAccount.id}');">删除</a>
						</td>
					</tr>
					</c:forEach>
				</table>
      </div>     
    </div>
  </div>
 <div class="blank12"></blank>
</div>
</body>
</html>